<template>
  <div>
    <!--面包屑-->
    <bread :bread="$route.meta.bread" />
    <!--页面-->
    <el-card>
      <el-table :data="tableData" stripe style="width: 100%" border>
        <el-table-column prop="id" label="#" width="180"> </el-table-column>
        <el-table-column prop="authName" label="权限名称"> </el-table-column>
        <el-table-column prop="path" label="路径"> </el-table-column>
        <el-table-column prop="level" label="权限等级">
          <template v-slot='scope'>
            <!-- {{scope.row.level}} -->
            <el-tag v-show=" scope.row.level=='0'">一级</el-tag>
            <el-tag type="success" v-show=" scope.row.level=='1'">二级</el-tag>
            <el-tag type="warning" v-show=" scope.row.level=='2'">三级</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import bread from "./../bread";
export default {
  components: { bread },
  name: "",
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.lcgetlist();
  },
  methods: {
    //获取页面数据
    async lcgetlist() {
      let { data: res } = await this.$axios.get(`rights/list`);
      console.log(res);
      this.tableData = res;
    },
  },
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped></style>
